import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/Login.vue'
import List from '../views//aside/List.vue'
import Publish from '../views//aside/Publish.vue'

Vue.use(VueRouter)

  const routes = [
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/index',
      name: 'Home',
      component: Home,
      redirect:'/index/list',
      children:[
        {
          path: '/index/list',
          name: 'List',
          component: List,
        },
        {
          path: '/index/publish',
          name: 'Publish',
          component: Publish,
        }
      ]
    }
]

const router = new VueRouter({
  routes
})

export default router
